#from outcome import capture
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
import time,os
import fateadm_api
driver = webdriver.Chrome()
driver.get("http://localhost:8088/login")
driver.find_element(By.NAME,"username").clear()
driver.find_element(By.NAME,"username").send_keys("admin")
driver.find_element(By.NAME,"password").clear()
driver.find_element(By.NAME,"password").send_keys("admin123")
filename="capture1.png"
if os.path.lexists(filename):
    os.remove(filename)
ele1=driver.find_element(By.XPATH,'//*[@id="signupForm"]/div[1]/div[2]/a/img')
ele1.screenshot(filename)
verification_code=str(fateadm_api.TestFunc())
driver.find_element(By.NAME,'validateCode').send_keys(verification_code)
time.sleep(3)
driver.find_element(By.ID,'btnSubmit').click()
time.sleep(2)
